﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Tibet.Logica;

namespace Tibet.GUI.Vista
{
    public partial class ReportesLista : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void cargarAcordion()
        {
            int i = 0; //Posicion del objeto en el arreglo.
            int id = int.Parse(Session["idUsuario"].ToString());
            foreach (Reporte a in ReportesControlador.Obtener().obtenerLista(id))
            {
                Response.Write("<h3><a href='#'> " + a.Nombre + "</a></h3>" +
                "<div>" +
                     "<Table width='100%'><tr>" +
                     "<td style='width:70%'>" + a.Graficar() + "</td><td style='width:70%'>" + a.MostrarDatos() + "</td>" +
                     "</tr><tr><td></td>" +
                     "<td><input type='button' value='Borrar' onclick='BorrarDeLista(" + i + ")' />" +
                     "</tr></Table>" +
                "</div>");
                i++;
            }
        }
    }
}